namespace Web.Control.Member.User
{
	using System;
	using System.Data;
	using System.Drawing;
	using System.Web;
	using System.Web.Security;
	using System.Web.UI.WebControls;
	using System.Web.UI.HtmlControls;
	using System.Text.RegularExpressions;
    using Lx.Web.Common.UI;
    using Lx.Web.Common.ControlsUI;
	using System.Collections;

    using Model.WWW_User.User;
    using BLF.WWW_User.Users;

    public class Confirm : BaseControl
	{

		protected override void OnLoad(EventArgs e)
		{
            string MemberNo = "";
            string AffirmNo = "";
            if (!Page.IsPostBack)
            {
                if (Page.Request["AffirmNo"] != null && Page.Request["MemberNo"] != null)
                {
                    MemberNo = Page.Request["MemberNo"].ToString();
                    AffirmNo = Page.Request["AffirmNo"].ToString();
                }
                else
                {
                    Page.Response.End();
                }
                UserModel bum = User.GetDetailUserInfo(MemberNo);
                if (bum != null)
                {
                    if (Globals.Enctype(bum.AffirmNo) != AffirmNo)
                    {
                        Page.Response.End();
                    }
                    else
                    {
                        User.Confirm(bum.MemberNo);
                        Page.Session["setp"] = null;
                        Page.Response.Redirect("/user/login.htm?Confirm=1&MemberEmail=" + bum.MemberCrtNo + "&IsShow=0&ReturnUrl=" + WWWHost + "/user/active_step1.htm");
                    }
                }
            }
			base.OnLoad (e);
		}
	}
}
